package cn.bdqn.controller;



import cn.bdqn.dto.Dto;
import cn.bdqn.service.SerachService;
import cn.bdqn.vo.AllHotelMessageVO;
import cn.bdqn.vo.HotCitySerachVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@Controller
public class SerachController {

    @Resource
    private SerachService serachService;

    /**
     * 通过目的地、商圈、星级、关键字 、时间来查询酒店
     *查询酒店
     * @param
     * @return
     */
    @ApiOperation(value = "查询酒店分页", httpMethod = "POST",
            protocols = "HTTP", produces = "application/json",
            response = Dto.class, notes = "通过目的地、商圈、星级、关键字 、时间来查询酒店")
    @RequestMapping(value = "/api/hotellist/searchItripHotelPage", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    Dto selectAllHotelByPage(@RequestBody AllHotelMessageVO allHotelMessageVO){
        Dto dto=null;
            dto=serachService.selectHotelAllMessage(allHotelMessageVO);
        return dto;
    }

    /**
     * 通过目的地、商圈、星级、关键字 、时间来查询酒店
     *查询酒店
     * @param
     * @return
     */
    @ApiOperation(value = "查询热门城市酒店", httpMethod = "POST",
            protocols = "HTTP", produces = "application/json",
            response = Dto.class, notes = "通过城市id，数量来显示酒店")
    @RequestMapping(value = "/api/hotellist/searchItripHotelListByHotCity", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    Dto selectHotCityHotel(@RequestBody HotCitySerachVO hotCitySerachVO){
        Dto dto=null;
        dto=serachService.selectHotCityHotel(hotCitySerachVO);
        return dto;
    }
}
